//
//  ZXStatusRetweetedView.m
//  ZXOCWeiBo
//
//  Created by mac on 15/12/10.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "ZXStatusRetweetedView.h"
#import "ZXStatusPhotosVIew.h"

@interface ZXStatusRetweetedView()

@property(nonatomic,weak)UILabel* contentLabel;
@property(nonatomic,weak)ZXStatusPhotosVIew * photosView;
@end

@implementation ZXStatusRetweetedView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.image =[UIImage resizeImageWithName:@"timeline_retweet_background_highlighted"];
         self.userInteractionEnabled = YES;
//        self.backgroundColor = [UIColor redColor];
        //内容
        UILabel * contentLabel = [[UILabel alloc]init];
        contentLabel.font = ZXStatusOrginlTextFont;
//        contentLabel.backgroundColor = [UIColor blueColor];
        contentLabel.numberOfLines = 0;
        [self addSubview:contentLabel];
        self.contentLabel = contentLabel;
        
//        配图
        ZXStatusPhotosVIew * photosView = [[ZXStatusPhotosVIew alloc]init];
//        photosView.backgroundColor = [UIColor yellowColor];
        [self addSubview:photosView];
        self.photosView = photosView;
    }
    return self;
}
-(void)setRetweetedFrm:(ZXStatusRetweetedFrm *)retweetedFrm
{
    _retweetedFrm = retweetedFrm;
    
    self.contentLabel.text = retweetedFrm.retweetedStatus.retweeteContent;
//    设content frm
    self.contentLabel.frame = retweetedFrm.contentFrm;
//    设置自身frm
    self.frame = retweetedFrm.selfFrm;
//    设置配图的frm
    self.photosView.frame = retweetedFrm.photosFrm;
    self.photosView.pic_urls = retweetedFrm.retweetedStatus.pic_urls;
    
}

@end
